<script>



	export default {
		onLaunch: function() {
			console.log('App Launch')
      this.overShare()
		},
    
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
    methods:{
      overShare:function() {
        // 监听路由切换
        wx.onAppRoute(function(res) {
          let pages = getCurrentPages()
          let view = pages[pages.length - 1]
          if(view && res.path !== 'subpkg/my-kj/my-kj') {
            wx.showShareMenu({
              withShareTicket:true,
              menus:['shareAppMessage','shareTimeline']
            })
          }
        })
      },
    }
	}
</script>

<style>
	/*每个页面公共css */
 *{
  margin: 0;
  padding: 0;
 }
</style>
